"""
File: tag_user.py
Author: ershixiong
Date: 2023/12/28
describe:

"""
from hogwarts.WeworkApi.apis.wework import Wework


class TagUser(Wework):
    def create(self, data):
        url = 'tag/addtagusers'
        pay_load = {
            "method": 'post',
            "url": url,
            "json": data
        }
        res = self.send(pay_load)
        return res

    def list(self, id):
        url = 'tag/get'
        params = {
            'tagid': id
        }
        pay_load = {
            'method': 'get',
            'url': url,
            'params': params
        }
        res = self.send(pay_load)
        return res

    def delete(self, data):
        url = 'tag/deltagusers'
        pay_load = {
            'method': 'get',
            'url': url,
            'json': data
        }
        res = self.send(pay_load)
        return res
